home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Shareware / Comunicatii / feedaemon / fd110rc5.exe / {app} / Data / defaults / styles / Serif (large font).fdxsl < prev    next >
Extensible Markup Language  |  2004-02-16  |  6KB  |  152 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0"
  4.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.     xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
  6. <xsl:output method="html"/>
  7. <xsl:variable name="common-styles">
  8.     <style type="text/css">
  9.         body { font: 125% Georgia, serif; margin: 22px 30px; background-color: #fff;}
  10.         a { color: #003399; text-decoration: none;}
  11.         a:hover { color: #6B8ADE; text-decoration: underline; }
  12.         span.nodescription {    font-size: x-small; color: silver;}
  13.         div.newspapertitle { font: 140% "Trebuchet MS", Tahoma, Arial, sans-serif; font-weight: bold; text-align: left; border-bottom: 6px double #CC3380; margin-bottom: 28px; padding-bottom: 14px; }
  14.         div.channeltitle { font-size: larger; font-weight: bold; text-transform: uppercase; margin-top: 14px; margin-bottom: 14px;}
  15.         div.newsitemdate { font-size: xx-small; color: gray; font-style: italic; text-align: left; font-weight: normal; margin-top: 4px; margin-bottom: 4px; }
  16.         div.newsitemcontent { border-bottom: 1px solid #99ccff;    margin-bottom: 22px; padding-bottom: 22px; }
  17.         div.newsitemcontent ol, div.newsitemcontent ul { list-style-position: inside;}        
  18.         div.newsitemcontent a {    text-decoration: underline; }
  19.         div.newsitemtitle { font-weight: bold; }
  20.         div.newsitemtitle, div.newsitemcontent, div.newsitemdate { margin-left: 24px;}
  21.         img.channel { float: right; border: none; margin-right: 8px;}
  22.         img {    clear: both; }
  23.     </style>
  24. </xsl:variable>
  25.  
  26. <!-- channel group newspaper -->
  27. <xsl:template match="newspaper[@type='group']">
  28.     <html xmlns:m="http://www.w3.org/1998/Math/MathML">
  29.     <head>
  30.         <title>Group Newspaper</title>
  31.         <xsl:copy-of select="$common-styles"/>
  32.     </head>
  33.     <body>
  34.         <div class="newspapertitle"><xsl:value-of select="title" disable-output-escaping="yes"/></div>
  35.         
  36.         <!-- loop through each channel -->
  37.         <xsl:for-each select="channel">
  38.             <xsl:variable name="chanlink" select="link"/>
  39.             <xsl:variable name="chantitle" select="title"/>
  40.         
  41.             <div class="channeltitle">
  42.                 <!-- channel image -->
  43.                 <xsl:if test="image">
  44.                   <xsl:variable name="imgurl" select="image/url"/>
  45.                   <xsl:variable name="imgtitle" select="image/title"/>
  46.                   <xsl:variable name="imglink" select="image/link"/>
  47.                   <a href="{$imglink}"><img class="channel" src="{$imgurl}" alt="{$imgtitle}"/></a>
  48.                 </xsl:if>
  49.                 <a href="{$chanlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  50.             </div>
  51.             
  52.             <!-- loop through each news item -->
  53.             <xsl:for-each select="item">
  54.                 <xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
  55.                <div class="newsitemtitle">
  56.                   <xsl:variable name="itemlink" select="link"/>
  57.                    <a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  58.                 </div>
  59.                 <div class="newsitemdate"><xsl:value-of select="fd:dateDisplay"/></div>
  60.                 <div class="newsitemcontent">
  61.                     <xsl:value-of select="description" disable-output-escaping="yes"/>
  62.                 </div>
  63.               </xsl:for-each>
  64.         </xsl:for-each>
  65.     </body>
  66.     </html>    
  67. </xsl:template>
  68.  
  69. <!-- channel newspaper -->
  70. <xsl:template match="newspaper[@type='channel']">
  71.     <html xmlns:m="http://www.w3.org/1998/Math/MathML">
  72.     <head>
  73.         <title>Channel Newspaper</title>
  74.         <xsl:copy-of select="$common-styles"/>
  75.     </head>
  76.     <body>
  77.         <div class="newspapertitle">
  78.             <!-- channel image -->
  79.             <xsl:if test="channel/image">
  80.               <xsl:variable name="imgurl" select="channel/image/url"/>
  81.               <xsl:variable name="imgtitle" select="channel/image/title"/>
  82.               <xsl:variable name="imglink" select="channel/image/link"/>
  83.               <a href="{$imglink}"><img class="channel" src="{$imgurl}" alt="{$imgtitle}"/></a>
  84.             </xsl:if>
  85.             <!-- channel title -->
  86.             <xsl:value-of select="title" disable-output-escaping="yes"/>
  87.         </div>
  88.         
  89.         <!-- loop through each news item -->
  90.         <xsl:for-each select="channel/item">
  91.             <xsl:sort select="fd:sortKey" data-type="number" order="descending"/>
  92.            <div class="newsitemtitle">
  93.               <xsl:variable name="itemlink" select="link"/>
  94.                <a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  95.             </div>
  96.             <div class="newsitemdate"><xsl:value-of select="fd:dateDisplay"/></div>
  97.             <div class="newsitemcontent">
  98.                 <xsl:value-of select="description" disable-output-escaping="yes"/>
  99.             </div>
  100.           </xsl:for-each>
  101.         
  102.     </body>
  103.     </html>
  104. </xsl:template>
  105.  
  106. <!-- single news item -->
  107. <xsl:template match="newspaper[@type='newsitem']">
  108.     <html xmlns:m="http://www.w3.org/1998/Math/MathML">
  109.     <head>
  110.         <title>News Item</title>
  111.         <xsl:copy-of select="$common-styles"/>
  112.         <style>
  113.             div.newspapertitle {    margin-bottom: 14px;  }
  114.         </style>
  115.     </head>
  116.     <body>
  117.         <xsl:for-each select="channel/item">        
  118.            <div class="newspapertitle">
  119.               <xsl:variable name="itemlink" select="link"/>
  120.                <a href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
  121.             </div>
  122.             <div class="newsitemdate"><xsl:value-of select="fd:dateDisplay"/></div>
  123.             <div class="newsitemcontent">
  124.                 <xsl:value-of select="description" disable-output-escaping="yes"/>
  125.                 <!-- add link to comments if available -->
  126.                 <xsl:if test="comments">
  127.                     <xsl:variable name="commentlink" select="comments"/>
  128.                     <xsl:variable name="commentimg" select="'$IMAGEDIR$comments.gif'"/>
  129.                     <a href="{$commentlink}"><img src="{$commentimg}" border="0" hspace="6"/></a>
  130.                 </xsl:if>
  131.                 <!-- add link to enclosure if available -->
  132.                 <xsl:if test="enclosure">
  133.                     <xsl:variable name="enclosurelink" select="enclosure/@url"/>
  134.                     <xsl:variable name="enclosureimg" select="'$IMAGEDIR$enclosure.gif'"/>
  135.                     <a href="{$enclosurelink}"><img src="{$enclosureimg}" border="0" hspace="6"/></a>
  136.                 </xsl:if>
  137.             </div>            
  138.           </xsl:for-each>
  139.         
  140.         <!-- channel image -->
  141.         <xsl:if test="channel/image">
  142.           <xsl:variable name="imgurl" select="channel/image/url"/>
  143.           <xsl:variable name="imgtitle" select="channel/image/title"/>
  144.           <xsl:variable name="imglink" select="channel/image/link"/>
  145.           <a href="{$imglink}"><img class="channel" src="{$imgurl}" alt="{$imgtitle}"/></a>
  146.         </xsl:if>
  147.         
  148.     </body>
  149.     </html>
  150. </xsl:template>
  151.  
  152. </xsl:stylesheet>